import React from 'react'
import {withRouter,} from 'react-router-dom'
import GoBackLayout from "../../layouts/GoBackLayout/GoBackLayout";
import {WhiteSpace, WingBlank} from "antd-mobile";
import constants from "../../utils/constants";
const CommonProblem = (props) => {

    const history = props.history
    const title = props.location.state.title
    const detail = constants.commonProblems.find(p => p.title === title).detail


    return <GoBackLayout
        title='常见问题'
        history={history}
    >

        <WingBlank>

            <WhiteSpace/>

            <h3 style={{
                marginBottom: '20px',
                fontWeight: 'bold',
            }}>{title}</h3>

            {detail.map((p, i) => <p
                style={{
                    marginBottom: '8px',
                    lineHeight: '17px',
                }}
                key={i}
            >
                {p}
            </p>)}

        </WingBlank>

    </GoBackLayout>


}

export default withRouter(CommonProblem)
